<template>
	<view>
		<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
			:duration="duration">
			<swiper-item  v-for="(item,i) in carouselItems" :key="i">
				<image :src="item.img" width="100%" mode="widthFix" />
			</swiper-item>
			
		</swiper>
	</view>
	
	
	
</template>

<script>
	export default {
		data() {
			return {
				carouselItems: [],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500
			}
		},
		methods: {
			
		},
		created() {
			uni.request({
			    url: 'http://www.zjff495.cn:5058/app/v1/home/index', //仅为示例，并非真实接口地址。
			    data: {
			        text: 'uni.request'
			    },
			    header: {
			        'custom-header': 'hello' //自定义请求头信息
			    },
			    success: (res) => {
			        // console.log(res.data);
			        // this.text = 'request success';
					
					console.log(res.data.data.carouselList);
					this.carouselItems =res.data.data.carouselList;
			    }
			});

		}
	}
</script>

<style>

</style>
